<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tvs_sdk_api: tvs_platform_adapter.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">tvs_sdk_api
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('tvs__platform__adapter_8h.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">结构体</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">tvs_platform_adapter.h 文件参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>TVS platform 接口层  
<a href="#details">更多...</a></p>
<div class="textblock"><div class="dynheader">
此图展示该文件直接或间接的被哪些文件引用了:</div>
<div class="dyncontent">
<div class="center"><img src="tvs__platform__adapter_8h__dep__incl.png" border="0" usemap="#tvs__platform__adapter_8hdep" alt=""/></div>
</div>
</div>
<p><a href="tvs__platform__adapter_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
结构体</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtvs__soundcard__config.html">tvs_soundcard_config</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">录音/播放状态  <a href="structtvs__soundcard__config.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtvs__platform__adaptor.html">tvs_platform_adaptor</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr class="memitem:aa892b615d8064cab6f92adec59f1f0c5"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#aa892b615d8064cab6f92adec59f1f0c5">tvs_platform_adaptor_soundcard_control</a>) (bool open, bool recorder, <a class="el" href="structtvs__soundcard__config.html">tvs_soundcard_config</a> *sc_config)</td></tr>
<tr class="memdesc:aa892b615d8064cab6f92adec59f1f0c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">实现此接口，向TVS SDK提供开启/关闭PCM语音录制、播放功能的能力；  <a href="#aa892b615d8064cab6f92adec59f1f0c5">更多...</a><br /></td></tr>
<tr class="separator:aa892b615d8064cab6f92adec59f1f0c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1c2d4a7924c744b5e159f6590a1fc6a"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#ae1c2d4a7924c744b5e159f6590a1fc6a">tvs_platform_adaptor_soundcard_pcm_read</a>) (void *data, unsigned int data_bytes)</td></tr>
<tr class="memdesc:ae1c2d4a7924c744b5e159f6590a1fc6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">实现此接口，向TVS SDK提供录制PCM语音的能力  <a href="#ae1c2d4a7924c744b5e159f6590a1fc6a">更多...</a><br /></td></tr>
<tr class="separator:ae1c2d4a7924c744b5e159f6590a1fc6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93097634ceeaed60ee38a27e1cc22415"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#a93097634ceeaed60ee38a27e1cc22415">tvs_platform_adaptor_soundcard_pcm_write</a>) (void *data, unsigned int data_bytes)</td></tr>
<tr class="memdesc:a93097634ceeaed60ee38a27e1cc22415"><td class="mdescLeft">&#160;</td><td class="mdescRight">实现此接口，向TVS SDK提供播放PCM语音的能力  <a href="#a93097634ceeaed60ee38a27e1cc22415">更多...</a><br /></td></tr>
<tr class="separator:a93097634ceeaed60ee38a27e1cc22415"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3897334bdb5655504a28dc0e9b0d213e"><td class="memItemLeft" align="right" valign="top">typedef bool(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#a3897334bdb5655504a28dc0e9b0d213e">tvs_platform_adaptor_is_network_valid</a>) ()</td></tr>
<tr class="memdesc:a3897334bdb5655504a28dc0e9b0d213e"><td class="mdescLeft">&#160;</td><td class="mdescRight">实现此接口，向TVS SDK提供获取当前网络状态的能力  <a href="#a3897334bdb5655504a28dc0e9b0d213e">更多...</a><br /></td></tr>
<tr class="separator:a3897334bdb5655504a28dc0e9b0d213e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af88724a2fe3deb87f9aabe0502db077c"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#af88724a2fe3deb87f9aabe0502db077c">tvs_platform_adaptor_set_current_volume</a>) (int cloud_volume, int max_value, bool do_init)</td></tr>
<tr class="memdesc:af88724a2fe3deb87f9aabe0502db077c"><td class="mdescLeft">&#160;</td><td class="mdescRight">实现此接口，向TVS SDK提供设置音量的能。 在TVS云端识别到用户的设置音量请求时，将下发音量设置命令，此函数将被回调  <a href="#af88724a2fe3deb87f9aabe0502db077c">更多...</a><br /></td></tr>
<tr class="separator:af88724a2fe3deb87f9aabe0502db077c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb3e02d8483dd61351f261d61825495c"><td class="memItemLeft" align="right" valign="top">typedef const char *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#afb3e02d8483dd61351f261d61825495c">tvs_platform_adaptor_load_preference</a>) (int *preference_size)</td></tr>
<tr class="memdesc:afb3e02d8483dd61351f261d61825495c"><td class="mdescLeft">&#160;</td><td class="mdescRight">实现此接口，向TVS SDK提供读取持久化配置的能力。 一般在设备重启的时候，会回调此函数加载持久化配置的各项参数  <a href="#afb3e02d8483dd61351f261d61825495c">更多...</a><br /></td></tr>
<tr class="separator:afb3e02d8483dd61351f261d61825495c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accf46cac704828208aa1b707e924ca3e"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#accf46cac704828208aa1b707e924ca3e">tvs_platform_adaptor_save_preference</a>) (const char *preference_buffer, int preference_size)</td></tr>
<tr class="memdesc:accf46cac704828208aa1b707e924ca3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">实现此接口，向TVS SDK提供保存持久化配置的能力。 SDK在各种配置参数的值改变的时候，会回调此函数，保存新的持久化配置  <a href="#accf46cac704828208aa1b707e924ca3e">更多...</a><br /></td></tr>
<tr class="separator:accf46cac704828208aa1b707e924ca3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a52e6a9d945b27988d2de75640438c6e4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#a52e6a9d945b27988d2de75640438c6e4">tvs_platform_adapter_init</a> (<a class="el" href="structtvs__platform__adaptor.html">tvs_platform_adaptor</a> *adapter)</td></tr>
<tr class="memdesc:a52e6a9d945b27988d2de75640438c6e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化Platform Adapter  <a href="#a52e6a9d945b27988d2de75640438c6e4">更多...</a><br /></td></tr>
<tr class="separator:a52e6a9d945b27988d2de75640438c6e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad98a5c3fab7941f00b48581c0d3b6304"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#ad98a5c3fab7941f00b48581c0d3b6304">tvs_platform_adapter_on_volume_changed</a> (int cloud_volume)</td></tr>
<tr class="memdesc:ad98a5c3fab7941f00b48581c0d3b6304"><td class="mdescLeft">&#160;</td><td class="mdescRight">当系统音量改变的时候，需要调用此函数通知sdk  <a href="#ad98a5c3fab7941f00b48581c0d3b6304">更多...</a><br /></td></tr>
<tr class="separator:ad98a5c3fab7941f00b48581c0d3b6304"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad607e9b94e40d747093cd2c9ca86823e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tvs__platform__adapter_8h.html#ad607e9b94e40d747093cd2c9ca86823e">tvs_platform_adapter_on_network_state_changed</a> (bool connect)</td></tr>
<tr class="memdesc:ad607e9b94e40d747093cd2c9ca86823e"><td class="mdescLeft">&#160;</td><td class="mdescRight">当网络状态发生变化的时候，需要调用此函数通知SDK; 注意，在配网时终端作为AP的情况下，网络应该被认为是断开状态， 直到配网结束，终端退出AP模式，重新连上目标WIFI之后，才能调用此函数  <a href="#ad607e9b94e40d747093cd2c9ca86823e">更多...</a><br /></td></tr>
<tr class="separator:ad607e9b94e40d747093cd2c9ca86823e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>TVS platform 接口层 </p>
<dl class="section date"><dt>日期</dt><dd>2019-5-10 </dd></dl>
</div><h2 class="groupheader">类型定义说明</h2>
<a id="a3897334bdb5655504a28dc0e9b0d213e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3897334bdb5655504a28dc0e9b0d213e">&#9670;&nbsp;</a></span>tvs_platform_adaptor_is_network_valid</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef bool(* tvs_platform_adaptor_is_network_valid) ()</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>实现此接口，向TVS SDK提供获取当前网络状态的能力 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afb3e02d8483dd61351f261d61825495c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb3e02d8483dd61351f261d61825495c">&#9670;&nbsp;</a></span>tvs_platform_adaptor_load_preference</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef const char*(* tvs_platform_adaptor_load_preference) (int *preference_size)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>实现此接口，向TVS SDK提供读取持久化配置的能力。 一般在设备重启的时候，会回调此函数加载持久化配置的各项参数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">preference_size</td><td>出参，代表当前持久化配置数据占用内存空间的总字节数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>当前系统的持久化配置数据，由此函数内部通过malloc在堆上申请内存，SDK调完此接口，将会调用free释放内存 </dd></dl>

</div>
</div>
<a id="accf46cac704828208aa1b707e924ca3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accf46cac704828208aa1b707e924ca3e">&#9670;&nbsp;</a></span>tvs_platform_adaptor_save_preference</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* tvs_platform_adaptor_save_preference) (const char *preference_buffer, int preference_size)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>实现此接口，向TVS SDK提供保存持久化配置的能力。 SDK在各种配置参数的值改变的时候，会回调此函数，保存新的持久化配置 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">preference_buffer</td><td>带保存的持久化配置数据 </td></tr>
    <tr><td class="paramname">preference_size</td><td>当前持久化配置数据占用内存空间的总字节数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>0为保存成功，其他值为保存失败 </dd></dl>

</div>
</div>
<a id="af88724a2fe3deb87f9aabe0502db077c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af88724a2fe3deb87f9aabe0502db077c">&#9670;&nbsp;</a></span>tvs_platform_adaptor_set_current_volume</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* tvs_platform_adaptor_set_current_volume) (int cloud_volume, int max_value, bool do_init)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>实现此接口，向TVS SDK提供设置音量的能。 在TVS云端识别到用户的设置音量请求时，将下发音量设置命令，此函数将被回调 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cloud_volume</td><td>TVS云端下发的音量，需要转换为当前终端的实际音量，计算公式为(cloud_volume * 设备端平台支持的最大音量值 / 100) </td></tr>
    <tr><td class="paramname">max_value</td><td>SDK定义的最大音量值，固定为100 </td></tr>
    <tr><td class="paramname">do_init</td><td>取值true代表SDK当前正从preference中读取音量并设置（一般在调用tvs_platform_adapter_init过程中） 取值false代表SDK当前正响应语音对话指令，或者从APP一侧设置音量 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>0为设置成功，其他值为设置失败 </dd></dl>

</div>
</div>
<a id="aa892b615d8064cab6f92adec59f1f0c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa892b615d8064cab6f92adec59f1f0c5">&#9670;&nbsp;</a></span>tvs_platform_adaptor_soundcard_control</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* tvs_platform_adaptor_soundcard_control) (bool open, bool recorder, <a class="el" href="structtvs__soundcard__config.html">tvs_soundcard_config</a> *sc_config)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>实现此接口，向TVS SDK提供开启/关闭PCM语音录制、播放功能的能力； </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">open</td><td>开启/关闭 </td></tr>
    <tr><td class="paramname">recorder</td><td>设置为true，代表操作PCM录制功能, 设置为false，代表操作PCM播放功能 </td></tr>
    <tr><td class="paramname">sc_config</td><td>声卡参数, 只用于开启PCM录制或者播放的情况，其他情况都为NULL </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>等于0代表操作成功，其他值代表操作失败 </dd></dl>

</div>
</div>
<a id="ae1c2d4a7924c744b5e159f6590a1fc6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1c2d4a7924c744b5e159f6590a1fc6a">&#9670;&nbsp;</a></span>tvs_platform_adaptor_soundcard_pcm_read</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* tvs_platform_adaptor_soundcard_pcm_read) (void *data, unsigned int data_bytes)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>实现此接口，向TVS SDK提供录制PCM语音的能力 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>录制PCM语音的缓冲区 </td></tr>
    <tr><td class="paramname">data_bytes</td><td>缓冲区data的长度，单位为字节 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>大于0，代表实际录制的字节数，小于等于0代表录制失败 </dd></dl>

</div>
</div>
<a id="a93097634ceeaed60ee38a27e1cc22415"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93097634ceeaed60ee38a27e1cc22415">&#9670;&nbsp;</a></span>tvs_platform_adaptor_soundcard_pcm_write</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* tvs_platform_adaptor_soundcard_pcm_write) (void *data, unsigned int data_bytes)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>实现此接口，向TVS SDK提供播放PCM语音的能力 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>待播放的PCM语音的缓冲区 </td></tr>
    <tr><td class="paramname">data_bytes</td><td>缓冲区data的长度，单位为字节 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>大于0，代表实际播放的字节数，小于等于0代表播放失败 </dd></dl>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="a52e6a9d945b27988d2de75640438c6e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52e6a9d945b27988d2de75640438c6e4">&#9670;&nbsp;</a></span>tvs_platform_adapter_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tvs_platform_adapter_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtvs__platform__adaptor.html">tvs_platform_adaptor</a> *&#160;</td>
          <td class="paramname"><em>adapter</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>初始化Platform Adapter </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">adapter</td><td>已经实现的各个回调函数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>0为成功，其他值为失败 </dd></dl>

</div>
</div>
<a id="ad607e9b94e40d747093cd2c9ca86823e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad607e9b94e40d747093cd2c9ca86823e">&#9670;&nbsp;</a></span>tvs_platform_adapter_on_network_state_changed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tvs_platform_adapter_on_network_state_changed </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>connect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>当网络状态发生变化的时候，需要调用此函数通知SDK; 注意，在配网时终端作为AP的情况下，网络应该被认为是断开状态， 直到配网结束，终端退出AP模式，重新连上目标WIFI之后，才能调用此函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">connect</td><td>为true表示当前终端已经连上外网，为false表示当前网络断开 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="ad98a5c3fab7941f00b48581c0d3b6304"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad98a5c3fab7941f00b48581c0d3b6304">&#9670;&nbsp;</a></span>tvs_platform_adapter_on_volume_changed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tvs_platform_adapter_on_volume_changed </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cloud_volume</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>当系统音量改变的时候，需要调用此函数通知sdk </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cloud_volume</td><td>当前音量值，取值为(当前设备端音量 * 100 /设备端平台支持的最大音量值) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>0为成功，其他值为失败 </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="tvs__platform__adapter_8h.html">tvs_platform_adapter.h</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
